package jdbc;

import jdbc.utill.DButil;

import java.sql.Connection;
import java.sql.PreparedStatement;

public class JdbcDemo08 {
    public static void main(String[] args) throws Exception {
        Connection connection = DButil.getConnection();
        String sql ="update t_user set username=?,password=? where id=?";
        PreparedStatement ps = connection.prepareStatement(sql);
        ps.setString(1,"张百万");
        ps.setString(2,"88888888");
        ps.setInt(3,1);
        ps.executeUpdate();
        DButil.close(connection);
    }
}
